package com.chujian.system.sys.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.chujian.framework.core.base.BaseMapper;
import com.chujian.sys.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 人员表 Mapper 接口
 *
 * @author chujian
 * @since 2021-07-28
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    @InterceptorIgnore(tenantLine = "true")
    @Select("select * from sys_user where delete_flag = 0 and (login_name = #{account} OR email = #{account} OR mobile = #{account})")
    List<SysUser> listByUserAccount(@Param("account") String account);

}
